﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Restarty_SIPO3.Class
{
    class Error
    {
        public Error()
        {
            IsError = false;
        }
        public String ErrorText { get; set; }
        public bool IsError { get; set; }

        public Exception Chyba
        {
            get
            {
                return Chyba;
            }
            set
            {
                try
                {
                    ErrorText = value.Message;
                    IsError = true;
                    Chyba = value;
                }
                catch (Exception e)
                {
                    ErrorText = e.Message;
                    IsError = true;
                    Chyba = value;
                }
            }
        }
    }
}
